﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ext.Net;

namespace Global
{
    public class GlobalMethod
    {
        public static string CreateSlug(string name)
        {
            return Lib.StringProccess.RemoveUnicode(name).Replace(" ", "-").Replace("/", "-").Replace(".", "-").Replace(",","").Replace("--","-");
        }
        public static void ErrorMsg(string msg)
        {
            X.Msg.Show(new MessageBoxConfig
                {
                    Buttons = MessageBox.Button.OK,
                    Icon = MessageBox.Icon.ERROR,
                    Title = "Fail",
                    Message = msg
                });
        }
    }
}
